#ifndef _LCD_H_
#define _LCD_H_

#include "lcd_init.h"

void lcd_frame_buff_init(int lcd_w, int lcd_h);
void lcd_set_address(uint16_t xs, uint16_t ys, uint16_t xe, uint16_t ye);
void lcd_frame_clear(uint16_t color);
void lcd_frame_refresh(void);
void lcd_frame_draw_point (uint16_t x, uint16_t y, uint16_t color);
void lcd_refresh_mutex_release(void);
void lcd_frame_show_picture( uint16_t width, uint16_t height, const uint8_t pic[]);

void LCD_Fill(uint16_t xs, uint16_t ys, uint16_t xe, uint16_t ye, uint16_t color);
void lcd_show_picture(uint16_t x, uint16_t y, uint16_t width, uint16_t height, const uint8_t pic[]);
void lcd_draw_point (uint16_t x, uint16_t y, uint16_t color);

#define WHITE 0xFFFF
#define BLACK 0x0000
#define BLUE 0x001F
#define BRED 0XF81F
#define GRED 0XFFE0
#define GBLUE 0X07FF
#define RED 0xF800
#define MAGENTA 0xF81F
#define GREEN 0x07E0
#define CYAN 0x7FFF
#define YELLOW 0xFFE0
#define BROWN 0XBC40
#define BRRED 0XFC07
#define GRAY 0X8430
#define DARKBLUE 0X01CF
#define LIGHTBLUE 0X7D7C
#define GRAYBLUE 0X5458
#define LIGHTGREEN 0X841F
#define LGRAY 0XC618
#define LGRAYBLUE 0XA651
#define LBBLUE 0X2B12
#endif
